<?php $this->load->view('Pre/common/header.html');?>
<div class="banner">
    <div class="banner_box" id="pic">
        <ul>
            <?php foreach($bannerList as $bannerItem):?>
            <li style="background:url('<?php echo $bannerItem->imgurl;?>') no-repeat center center;"></li>
            <?php endforeach;?>
        </ul>
    </div>
    <div id="tip">
        <div class="prev" id="focus_btn_left"></div>
        <ul>
            <?php foreach($bannerList as $bannerItem):?>
            <li></li>
            <?php endforeach;?>          
        </ul>
        <div class="next" id="focus_btn_right"></div>
    </div>

</div>

<div class="affiche">
    <div class="notice_box">
        <div class="notice_left">
            最新公告
        </div>
        <div class="notice-top">
            <div class="hd">
                <a class="next"></a>
                <a class="prev"></a>
            </div>
            <div class="bd">
                <ul class="infoList">
                    <?php foreach($noticeList as $noticeItem):?>
                    <li><?php echo $noticeItem->content?><span class="date">[<?php echo date('Y-m-d',strtotime($noticeItem->adddate)) ?>]</span></li>
                    <?php endforeach;?>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="talk">
    <div class="talk1">
        <?php for($i=0;$i<count($didacticslist);$i++):?>
        <div class="talk2 mk_<?php echo $i?>">
            <div class="silk_<?php echo $i?>">
                <div style="background:url(<?php echo $didacticslist[$i]->imgurl?>) no-repeat center center"></div>
                <p class="title_m"><?php echo $didacticslist[$i]->title?></p>
                <p><?php echo $didacticslist[$i]->description?></p>

            </div>
            <div class="hover">
                <p class="title_m"><?php echo $didacticslist[$i]->title?></p>
                <p><?php echo $this->cutstring->content_replace($didacticslist[$i]->contents) ?></p>
                <div>
                    <p class="b<?php echo $i?> p_<?php echo $i?>"><a href="">MORE</a>  </p>
                </div>
                <hr />
            </div>
        </div>
        <?php endfor;?>
    </div>
</div>
<div class="video">
    <div>
        <div class="Vtitle">
            <p class="Vt Vtitle1">体验课<span class="Vtitle1span">Experience Class</span></p>
            <a href="<?php echo site_url('join/project/7')?>" class="Vtitle2">更多</a>
        </div>
        <div>
            
            <div id="playvideo" style="width: 812px;height: 423px;background-size: 100%;vertical-align: top;margin-right: 10px;display: inline-block;"></div>
            <div class="Vleft">
                <div>
                    <p class="t1"><?php echo !empty($projectModel)?$projectModel->title:""?></p>
                    <p><?php echo !empty($projectModel)?$projectModel->description:""?></p>
                </div>
                <div>
                    <p class="t2"><?php echo !empty($multimediaModel)?$multimediaModel->mtitle:""?></p>
                    <p><?php echo !empty($multimediaModel)?$multimediaModel->mdescription:""?></p>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="briefing">
    <div>
        <div class="a1">
            <div>
                <div class="g1 gg CP">公司简介</div>
                <div class="g2 CP">大事记</div>
                <div class="g3 CP">蓬菲文化</div>
                <div class="g4 CP">企业愿景</div>
            </div>
            <div class="a2">
                <div class="a21">
                    <?php echo !empty($aboutModel)?$aboutModel->description:""?>
                </div>
                <div class="a22">
                  
                    <?php foreach($eventList as $eventItem):?>
                    <div <?php echo $eventItem->eid==end($eventList)->eid?'style="margin-top: 45px;"':'' ?>>
                        <div>
                            <p><a href="<?php echo site_url('about/eventinfo/'.$eventItem->eid)?>"><?php echo $eventItem->title?></a></p>
                            <p>[<?php echo date('Y-m-d',strtotime($eventItem->adddate)) ?>]</p>
                            <span></span>
                        </div>
                        <p><a class="event_a_dp" href="<?php echo site_url('about/eventinfo/'.$eventItem->eid)?>"><?php echo $eventItem->description?></a>
                           
                        </p>
                    </div>
                    <?php endforeach;?>
                </div>
                <div class="a23">
                   <?php echo !empty($cultureModel)?$cultureModel->cdescription:""?>
                </div>
                <!--备用DIV（企业愿景）-->
                <div style="display: none;color: #595A5A;"><?php echo !empty($visionariesModel)?$visionariesModel->vdescription:""?></div>
            </div>
        </div>
        <div class="a11"></div>
    </div>
</div>
<div class="news">
    <div>
        <div class="Vtitle ntitle">
            <p class="Nt Vtitle1">蓬菲新闻<span class="Vtitle1span">PengFei News</span></p>
            <a href="<?php echo site_url('news/newlist/21')?>" class="Vtitle2">更多</a>
        </div>
        <div class="prayer">
            <?php foreach($newList as $newItem):?>
            
                 <div class="prayerone CP">

                     <img src="<?php echo $newItem->imgurl?>" />
                     <div class="prayer1">
                         <p><a href="<?php echo site_url('news/newinfo/'.$newItem->nid)?>" class="new_title"><?php echo $newItem->title?></a> </p>
                         <p><a class="new_dp" href="<?php echo site_url('news/newinfo/'.$newItem->nid)?>"><?php echo $newItem->description?></a> </p>
                     </div>
                     <div class="prayer2">
                         <p><?php echo date('m-d',strtotime($newItem->adddate)) ?></p>
                         <p><?php echo date('Y',strtotime($newItem->adddate)) ?></p>
                     </div>
                 </div>        
            <?php endforeach;?>
        </div>
    </div>
</div>

<script type="text/javascript">
                function showVideo(domid, vid) {
                    var client_id = "<?php echo !empty($videoModel)?$videoModel->client_id:""?>";
                    if (client_id == "") {
                        layer.msg('请完善视频设置', { icon: 5 });
                    } else {
                        player = new YKU.Player(domid, {
                            client_id: client_id,
                            vid: vid,
                            show_related: false
                        });
                    }
                }
                $(function () {
                    var videoId = "<?php echo !empty($video_listModel)?$video_listModel->video_id:"err"?>";
                    showVideo('playvideo', videoId);
                })
</script>
<script type="text/javascript">
    jQuery(".banner").slide({ titCell: "#tip li", mainCell: "#pic ul", effect: "left", autoPlay: true, delayTime: 1000, trigger: "click" });
    jQuery(".notice-top").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: true });
</script>
<?php $this->load->view('Pre/common/footer.html');?>

<script type="text/javascript">
         function WebSocketTest()
         {
            if ("WebSocket" in window)
            {
               alert("您的浏览器支持 WebSocket!");

               // 打开一个 web socket
               var ws = new WebSocket("ws://www.syj.com:9998/echo");

               ws.onopen = function()
               {
                  // Web Socket 已连接上，使用 send() 方法发送数据
                  ws.send("发送数据");
                  alert("数据发送中...");
               };

               ws.onmessage = function (evt)
               {
                  var received_msg = evt.data;
                  alert("数据已接收...");
               };

               ws.onclose = function()
               {
                  // 关闭 websocket
                  alert("连接已关闭...");
               };
            }

            else
            {
               // 浏览器不支持 WebSocket
               alert("您的浏览器不支持 WebSocket!");
            }
         }
         WebSocketTest();
</script>

<!--</body>
</html>-->
